package org.hk.kg.finance;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.hk.kg.db.DBContext;
import org.hk.kg.utils.Constants;

public class ClzTypeInit implements Runnable {
	@Override
	public void run() {
		List<Map> maps = DBContext.instatnce.query(Constants.DB_DEFAULT, "select clzTypeId,clzTypeName from clzzType");
		Map<String,String> types = new HashMap<String,String>();
		for(Map m : maps)
		{
			types.put(""+m.get("clzTypeId"), ""+m.get("clzTypeName"));
		}
		Constants.CONFIG.append(FinanceConstants.CLZ_TYPE_CONSTANTS, types);
	}

}
